#include "Switcher.h"
#include "ui_Switcher.h"

Switcher::Switcher(QWidget *parent) : QWidget(parent),ui(new Ui::Switcher){
    ui->setupUi(this);
    this->gameMod = mod5v5Full;
}





void Switcher::switchMod(){
    this -> gameMod = (Switcher::GameMod)(((int) this->gameMod < 3) ? ((int) this->gameMod + 1 ) : (0));
    emit signalGameModChanged();
}


void Switcher::setText(QString text){
    this->ui->text->setText(text);
    this->ui->textShadow->setText(text);
}

void Switcher::updateText(){
    QList<QString> gameModsNames = QList<QString>();
    QList<QString> gameModsCompleteNames = QList<QString>();

    gameModsNames << "5v5 J" << "3v3" << "5v5 L" << "Off";
    gameModsCompleteNames << "5v5 Jungler" << "3v3" << "5v5 Lite" << "Off";

    this->setToolTip(gameModsCompleteNames[(int) this -> gameMod]);
    setText(gameModsNames[(int) this -> gameMod]);
}



Switcher::GameMod Switcher::getMod(){
    return this -> gameMod;
}

Switcher::~Switcher()
{
    delete ui;
}
